import java.awt.*;

public class GameUtils {
    //上蛇头
    public static Image upImg = Toolkit.getDefaultToolkit().getImage("snake.img/head1.png");
    //下蛇头
    public static Image downImg = Toolkit.getDefaultToolkit().getImage("snake.img/head2.png");
    //左蛇头
    public static Image leftImg = Toolkit.getDefaultToolkit().getImage("snake.img/head3.png");
    //右蛇头
    public static Image rightImg = Toolkit.getDefaultToolkit().getImage("snake.img/head4.png");
    //蛇身
    public static Image bodyImg = Toolkit.getDefaultToolkit().getImage("snake.img/body.png");
    //食物
    public static Image foodImg = Toolkit.getDefaultToolkit().getImage("snake.img/food.png");
    //关卡
    public static int level = 1;
    // 通关条件（每关需要的分数）
    public static final int[] LEVEL_TARGETS = {5, 10, 15, 20, Integer.MAX_VALUE}; // 第五关为无尽模式

    // 颜色配置
    public static final Color COLOR_LEVEL_TEXT = new Color(255, 105, 180); // 热粉色 - 关卡文字
    public static final Color COLOR_SCORE_TEXT = new Color(30, 144, 255);  // 道奇蓝 - 分数文字
    public static final Color COLOR_START_TEXT = new Color(50, 205, 50);   // 石灰绿 - 开始提示
    public static final Color COLOR_PAUSE_TEXT = new Color(255, 165, 0);   // 橙色 - 暂停提示
    public static final Color COLOR_FAIL_TEXT = new Color(220, 20, 60);    // 猩红色 - 失败提示
    public static final Color COLOR_WIN_TEXT = new Color(0, 128, 0);       // 绿色 - 通关提示
    public static final Color COLOR_ENDLESS_TEXT = new Color(148, 0, 211); // 紫色 - 无尽模式

    // 背景和网格颜色
    public static final Color COLOR_BACKGROUND = new Color(240, 240, 240); // 浅灰色背景
    public static final Color COLOR_GRID = new Color(200, 200, 200);       // 网格线颜色

    //绘制文字
    public static void drawWord(Graphics g,String str,Color color,int size,int x,int y){
        g.setColor(color);
        g.setFont(new Font("仿宋",Font.BOLD,size));
        g.drawString(str, x, y);
    }
}
